package com.sh.data.engine.application.model.mapper.authority;

import com.sh.data.engine.application.model.request.management.ProjectRoleCreateRequest;
import com.sh.data.engine.application.model.request.management.ProjectRoleUpdateRequest;
import com.sh.data.engine.domain.authority.model.param.RoleParam;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * @author: mengzheng.mhc
 * @date: 2024/12/9 14:14
 */
@Mapper(componentModel = "spring")
public interface RoleParamMapper {

    @Mapping(source = "name", target = "roleName")
    @Mapping(source = "desc", target = "roleDesc")
    RoleParam map(ProjectRoleCreateRequest request);

    @Mapping(source = "name", target = "roleName")
    @Mapping(source = "desc", target = "roleDesc")
    RoleParam map(ProjectRoleUpdateRequest request);
}
